<template>
	<view>
		<view class="user-about-app">
			<view
				class="user-about-app-item"
				v-for="item in aboutApp"
				:key="item.id">
				<view class="title">
					{{item.name}}
				</view>
				<view class="context">
					{{item.content}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {
		},
		data() {
			return {
				aboutApp: []
			}
		},
		onLoad() {
			this.getAboutApp()
		},
		methods: {
			/**
			 * 获取关于app数据
			 */
			async getAboutApp() {
				let res = await this.$http.request({
					method: 'post',
					url: '/api/version/about',
					data: {}
				})
				if (res.status === 1) {
					this.aboutApp = res.data
				} else {
					uni.showToast({
						title: res.message,
						icon: 'none',
						duration: 3000
					})
				}
			},
			/**
			 * 跳转
			 * @param {String} page
			 */
			pageTo(page) {
				uni.navigateTo({
					url: page
				});
			},
		}
	}
</script>

<style lang="scss">
	.user-about-app {
		padding-top: 20rpx;
		&-item{
			margin-bottom: 20rpx;
			padding: 50rpx;
			background: $uni-bg-color;
			.title{
				line-height: 2.4;
				color: $uni-color-theme;
			}
			.context{
				color: $uni-text-color-grey2;
			}
		}
	}
</style>
